home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / pull70.zip / PULLDATA.PAS < prev    next >
Pascal/Delphi Source File  |  1993-06-21  |  20KB  |  653 lines

  1. { ========================================================================== }
  2. { PullData.pas - User Statistics for data-entry windows.   ver 7.0, 06-21-93 }
  3. {                                                                            }
  4. { This file contains all the data to configure the data-entry fields in      }
  5. { data windows or work windows.                                              }
  6. {   Copyright (c) 1988,1993 James H. LeMay, All rights reserved.             }
  7. { ========================================================================== }
  8.  
  9. {$i pulldefs.inc }
  10.  
  11. UNIT PullData;
  12.  
  13. INTERFACE
  14.  
  15. uses
  16.   Crt,Qwik,Wndw,Pull,PullDir,PullStat;
  17.  
  18. { ================ Set up variables for data windows here: ================= }
  19. { Place your variables names here to interface with the menus.               }
  20. { Careful! -- there's NO type checking for parameters in Transfer.  You MUST }
  21. { be certain case statement, DataWndw, and TypeOfData all match.  Be         }
  22. { especially careful of string lengths that are too long.  They can be no    }
  23. { longer than DataStrSize.                                                   }
  24. { -------------------------------------------------------------------------- }
  25.  
  26. const
  27.   aByte:      byte      =    129;
  28.   aWord:      word      =  50000;
  29.   aShortInt:  shortint  =    -10;
  30.   aInteger:   integer   = -31456;
  31.   aLongInt:   longint   = -123456789;
  32.   aReal:      real      = -24.34565E06;
  33.   aHex:       string[4] = 'FF03';
  34.   aChar:      char      = 'Q';
  35.   aString:    CrtStrType = 'This is a string';
  36.  
  37.   aByte2:     byte      =    219;
  38.   aWord2:     word      =  45600;
  39.   aShortInt2: shortint  =    -34;
  40.   aInteger2:  integer   =  -1100;
  41.   aLongInt2:  longint   = -98765432;
  42.   aReal2:     real      = -19.07070E12;
  43.   aHex2:      string[4] = 'FFFF';
  44.   aChar2:     char      = 'W';
  45.   aString2:   CrtStrType = 'This is another string';
  46.  
  47.   Seats:      byte      =      4;
  48.   Years:      byte      =     30;
  49.   Month:      byte      =      1;
  50.   Day:        byte      =     12;
  51.   Year:       integer   =   1989;
  52.   PriceLimit: integer   =   2000;
  53.  
  54. type
  55.   DataEntryNames = (
  56.     NoDE,aByte2DE,aWord2DE,aShortInt2DE,aInteger2DE,aLongInt2DE,aReal2DE,
  57.     aHex2DE,aChar2DE,aString2DE,FileNameDE);
  58.  
  59. var
  60.   PathName: string[67];    { for the pull-down directory }
  61.   DataEntryOattr,          { Output attribute }
  62.   DataEntryIattr,          { Input  attribute }
  63.   DataWndwIattr,           { Input  attribute }
  64.   DataWndwOattr,           { Output attribute }
  65.   DataWndwBattr:  byte;    { Border attribute }
  66.   DataWndwBrdr:   Borders;
  67.  
  68.  
  69. IMPLEMENTATION
  70.  
  71. uses
  72.   {$ifdef UseStrg }
  73.   Strg;
  74.   {$else }
  75.   Strs;
  76.   {$endif }
  77.  
  78. { ================ Set up your Error Message Lines here: ================== }
  79. { Error Messages are used for indicating that data entry was invalid or out }
  80. { of range.  ErrMsgLine[1] is reserved for custom error messages that you   }
  81. { can create at runtime.  Messages up to InvalidEM are reserved and must    }
  82. { match those in PULL.PAS.                                                  }
  83. { ------------------------------------------------------------------------- }
  84. type
  85.   ErrMsgNames = (NoEM,UserEM,InvalidEM,PathEM,RealEM,CharEM,StrEM);
  86.  
  87. {$ifdef UseMsgLineCode }
  88. procedure GetErrMsgs;
  89. begin
  90.   AutoNumLock := false;   { If true, turns on NumLock on with data entry }
  91.   CapsLockCol := 41;      { First column for ' CAPS NUM SCROLL ' on MsgLine. }
  92.  
  93.   ErrMsgLine[ord(InvalidEM)]:=' Invalid entry.             ESC-acknowledge';
  94.   ErrMsgLine[ord(PathEM)]   :=' Invalid path.  Use [d:][path].  Press ESC.';
  95.   ErrMsgLine[ord(RealEM)]   :=' Range: <=4.0e12            ESC-acknowledge';
  96.   ErrMsgLine[ord(CharEM)]   :=' "?" not allowed            ESC-acknowledge';
  97.   ErrMsgLine[ord(StrEM)]    :=' At least 3 chars required. ESC-acknowledge';
  98. end;
  99.  
  100. {$endif UseMsgLineCode }
  101.  
  102. procedure MakeErrMsg (Low,High: longint);
  103. begin
  104.   {$ifdef UseMsgLineCode }
  105.   DataPad.ErrMsg := ord(UserEM);
  106.   ErrMsgLine[ord(UserEM)] :=
  107.     'Range: '+StrL(Low)+' to '+StrL(High)+'.  Press ESC';
  108.   {$endif }
  109. end;
  110.  
  111. { ====================== Data Entry Range Checking ========================= }
  112. { These procedures are completely defined by the user.  They may not even be }
  113. { necessary if the string entered is satisfactory as a valid number.  The    }
  114. { calls must be forced to FAR because they are called indirectly.            }
  115. { "Translate" can alter each key from the keyboard before it gets evaluated. }
  116. { "Verify" will check the range or even completely alter the entire string.  }
  117. { -------------------------------------------------------------------------- }
  118.  
  119. procedure VerifyPath; far;
  120. begin
  121.   with DataPad do
  122.     begin
  123.       {$I-} ChDir (Sdata); {$I+}     { Check for valid directory }
  124.       if IOresult<>0 then
  125.         ErrMsg := ord(PathEM)
  126.       else GetDir (0,PathName);      { Have DOS parrot the path name }
  127.     end;
  128. end;
  129.  
  130. procedure VerifyFileMask; far;
  131. begin
  132.   with DataPad do
  133.     if Sdata='' then
  134.       Sdata:='*.*';
  135. end;
  136.  
  137. procedure VerifyPriceLimit; far;
  138. begin
  139.   with DataPad do
  140.     if ((Idata>25000) or (Idata<=0)) then
  141.       MakeErrMsg (1,25000);
  142. end;
  143.  
  144. procedure VerifyMonth; far;
  145. begin
  146.   with DataPad do
  147.     if ((Bdata=0) or (Bdata>12)) then
  148.       MakeErrMsg (1,12);
  149. end;
  150.  
  151. procedure VerifyDay; far;
  152. begin
  153.   with DataPad do
  154.     if ((Bdata=0) or (Bdata>31)) then
  155.       MakeErrMsg (1,31);
  156. end;
  157.  
  158. procedure VerifyYear; far;
  159. begin
  160.   with DataPad do
  161.     if ((Idata<1960) or (Idata>2010)) then
  162.       MakeErrMsg (1960,2010);
  163. end;
  164.  
  165. procedure VerifyYears; far;
  166. begin
  167.   with DataPad do
  168.     if ((Idata<4) or (Idata>30)) then
  169.       MakeErrMsg (4,30);
  170. end;
  171.  
  172. { -------------------- Work Window Data Entry Checking --------------------- }
  173.  
  174. procedure TranslateCase; far;
  175. begin
  176.   if not ExtKey then
  177.     Key := upcase(Key);        { Simple upper case translation }
  178. end;
  179.  
  180. procedure VerifyByte2; far;
  181. begin
  182.   with DataPad do
  183.     if ((Bdata>200) or (Bdata=0)) then
  184.       MakeErrMsg (1,200);
  185. end;
  186.  
  187. procedure VerifyWord2; far;
  188. begin
  189.   with DataPad do
  190.     if ((Wdata>45000) or (Wdata=0)) then
  191.       MakeErrMsg (1,45000);
  192. end;
  193.  
  194. procedure VerifyShortInt2; far;
  195. begin
  196.   with DataPad do
  197.     if ((SIdata>101) or (SIdata<-50)) then
  198.       MakeErrMsg (-50,101);
  199. end;
  200.  
  201. procedure VerifyInteger2; far;
  202. begin
  203.   with DataPad do
  204.     if ((Idata>20000) or (Idata<-10000)) then
  205.       MakeErrMsg (-10000,20000);
  206. end;
  207.  
  208. procedure VerifyLongInt2; far;
  209. begin
  210.   with DataPad do
  211.     if ((Ldata>850000) or (Ldata<-1000000)) then
  212.       MakeErrMsg (-1000000,850000);
  213. end;
  214.  
  215. procedure VerifyReal2; far;
  216. begin
  217.   with DataPad do
  218.     if (Rdata>4.0e12) then
  219.       ErrMsg := ord(RealEM);
  220. end;
  221.  
  222. procedure VerifyChar2; far;
  223. begin
  224.   with DataPad do
  225.     if (Cdata='?') then
  226.       ErrMsg := ord(CharEM);
  227. end;
  228.  
  229. procedure VerifyString2; far;
  230. begin
  231.   with DataPad do
  232.     if ord(Sdata[0])<3 then
  233.       ErrMsg := ord(StrEM);
  234. end;
  235.  
  236.  
  237. { ======================== GetUserDataEntry =================================}
  238. { The major configurations for all menus go here.  The program first clears  }
  239. { all RECORD values to $00.  The values below will set new values. Therefore,}
  240. { setting RECORD values to "false", nil, or the like is not necessary.       }
  241. { ---------------------------------------------------------------------------}
  242.  
  243. { Code saving utilities: }
  244. procedure GetDataWndw (Index: word);
  245. begin
  246.   DWI := Index;
  247.   TopDataWndw := DataWndw^[DWI];
  248. end;
  249.  
  250. procedure SaveDataWndw;
  251. begin
  252.   DataWndw^[DWI] := TopDataWndw;
  253. end;
  254.  
  255. procedure GetDataEntry (Index: word);
  256. begin
  257.   DEI := Index;
  258.   TopEntry := DataEntry^[DEI];
  259. end;
  260.  
  261. procedure SaveDataEntry;
  262. begin
  263.   DataEntry^[DEI] := TopEntry;
  264. end;
  265.  
  266. procedure GetDataEntryStats;
  267. begin
  268.  
  269.   { ------------- Set up your PULL-DOWN Data Windows here: ----------------- }
  270.   { Justification will default with numbers right justified and string to  }
  271.   { the left if none is specified.                                         }
  272.  
  273.   with TopDataWndw,TopDataWndw.Entry do
  274.     begin
  275.  
  276.       GetDataWndw (ord(BytesDW));        { Just gets cleared TopDataWndw }
  277.       VarAddr       := @aByte;
  278.     { TypeOfData    := Bytes; }          { This is the default }
  279.       Field         := 3;
  280.     { JustifyOutput := Right; }          { This is the default }
  281.     { MsgLineNum  := ord(DE_ML); }       { This is the default }
  282.       HelpWndwNum   := ord(NumericHW);
  283.       SaveDataWndw;                   { Saves it in the heap }
  284.  
  285.       GetDataWndw (ord(WordsDW));
  286.       VarAddr     := @aWord;
  287.       TypeOfData  := Words;
  288.       Field       := 5;
  289.     { JustifyOutput := Right; }        { This is the default for numbers }
  290.       HelpWndwNum := ord(NumericHW);
  291.       SaveDataWndw;
  292.  
  293.       GetDataWndw (ord(IntegersDW));
  294.       VarAddr     := @aInteger;
  295.       TypeOfData  := Integers;
  296.       Field       := 6;
  297.       HelpWndwNum := ord(NumericHW);
  298.       SaveDataWndw;
  299.  
  300.       GetDataWndw (ord(LongIntsDW));
  301.       VarAddr     := @aLongInt;
  302.       TypeOfData  := LongInts;
  303.       Field       := 11;
  304.       HelpWndwNum := ord(NumericHW);
  305.       SaveDataWndw;
  306.  
  307.       GetDataWndw (ord(RealsDW));
  308.       VarAddr     := @aReal;
  309.       TypeOfData  := Reals;
  310.       Field       := 17;
  311.       Decimals    :=  8;          { Neg value uses R:F.  Pos value - R:F:D. }
  312.       HelpWndwNum := ord(NumericHW);
  313.       SaveDataWndw;
  314.  
  315.       GetDataWndw (ord(CharsDW));
  316.       VarAddr     := @aChar;
  317.       TypeOfData  := Chars;
  318.       Field       := 1;
  319.       HelpWndwNum := ord(TextHW);
  320.       SaveDataWndw;
  321.  
  322.       GetDataWndw (ord(HexDW));
  323.       VarAddr     := @aHex;
  324.       TypeOfData  := UserNums;
  325.       Field       := 4;
  326.       SetName     := HexSet;     { Specify set name for custom sets }
  327.       TranslateProc := TranslateCase;
  328.       HelpWndwNum := ord(NumericHW);
  329.       SaveDataWndw;
  330.  
  331.       GetDataWndw (ord(StringsDW));
  332.       Title       := 'Enter string';
  333.       VarAddr     := @aString;
  334.       TypeOfData  := Strings;
  335.       Field       := 25;
  336.       MaxField    := pred(SizeOf(aString));
  337.     { JustifyOutput := Left; }         { This is the default for strings }
  338.       HelpWndwNum := ord(TextHW);
  339.       SaveDataWndw;
  340.  
  341.       GetDataWndw (ord(PathDW));
  342.       Title       := 'Enter path';
  343.       VarAddr     := @PathName;
  344.       TypeOfData  := Strings;
  345.       Field       := 40;
  346.       MaxField    := pred(SizeOf(PathName));
  347.       SetName     := PathSet;
  348.       CheckRangeProc := VerifyPath;
  349.       HelpWndwNum := ord(TextHW);
  350.       SaveDataWndw;
  351.  
  352.       GetDataWndw (ord(FileMaskDW));
  353.       Title       := 'Enter Mask';
  354.       VarAddr     := @FileMask;
  355.       TypeOfData  := Strings;
  356.       Field       := 12;
  357.       MaxField    := pred(SizeOf(FileMask));
  358.       SetName     := MaskSet;
  359.       CheckRangeProc := VerifyFileMask;
  360.       HelpWndwNum := ord(TextHW);
  361.       SaveDataWndw;
  362.  
  363.       GetDataWndw (ord(SeatsDW));
  364.       VarAddr     := @Seats;
  365.     { TypeOfData  := Bytes; }        { This is the default. }
  366.       Field       := 2;
  367.       HelpWndwNum := ord(NumericHW);
  368.       SaveDataWndw;
  369.  
  370.       GetDataWndw (ord(PriceDW));
  371.       VarAddr     := @PriceLimit;
  372.       TypeOfData  := Words;
  373.       Field       := 6;
  374.       HelpWndwNum := ord(NumericHW);
  375.       SaveDataWndw;
  376.  
  377.       GetDataWndw (ord(MonthDW));
  378.       VarAddr     := @Month;
  379.       Field       := 2;
  380.       CheckRangeProc := VerifyMonth;
  381.       HelpWndwNum := ord(NumericHW);
  382.       SaveDataWndw;
  383.  
  384.       GetDataWndw (ord(DayDW));
  385.       VarAddr     := @Day;
  386.     { TypeOfData  := Bytes; }        { This is the default. }
  387.       Field       := 2;
  388.       CheckRangeProc := VerifyDay;
  389.       HelpWndwNum := ord(NumericHW);
  390.       SaveDataWndw;
  391.  
  392.       GetDataWndw (ord(YearDW));
  393.       VarAddr     := @Year;
  394.       TypeOfData  := Integers;
  395.       Field       := 4;
  396.       CheckRangeProc := VerifyYear;
  397.       HelpWndwNum := ord(NumericHW);
  398.       SaveDataWndw;
  399.  
  400.       GetDataWndw (ord(YearsDW));
  401.       VarAddr     := @Years;
  402.       TypeOfData  := Integers;
  403.       Field       := 2;
  404.       CheckRangeProc := VerifyYears;
  405.       HelpWndwNum := ord(NumericHW);
  406.       SaveDataWndw;
  407.  
  408.   end;  { with }
  409.  
  410.   { ------------------------ Work Window Data Entry ------------------------ }
  411.   AutoTab := true;    { After entry, tabs to next one in sequence }
  412.   with DataPad do
  413.     if QvideoMode=Mono then
  414.          Hattr := LightGrayBG
  415.     else Hattr := White+CyanBG; { Optional Attribute of Data Entry hilite }
  416.                                 { Use SameAttr if not desired }
  417.   with TopEntry do
  418.     begin
  419.  
  420.       GetDataEntry (ord(aByte2DE));
  421.       VarAddr     := @aByte2;
  422.       TypeOfData  := Bytes;
  423.       Row         := 14;
  424.       Col         := 20;
  425.       Field       := 4;
  426.       MaxField    := 3;
  427.       CheckRangeProc := VerifyByte2;
  428.     { MsgLineNum  := ord(DE_ML); }     { This is the default }
  429.       HelpWndwNum := ord(NumericHW);
  430.       SaveDataEntry;
  431.  
  432.       GetDataEntry (ord(aWord2DE));
  433.       VarAddr     := @aWord2;
  434.       TypeOfData  := Words;
  435.       Row         := 15;
  436.       Col         := 20;
  437.       Field       := 6;
  438.       CheckRangeProc := VerifyWord2;
  439.       HelpWndwNum := ord(NumericHW);
  440.       SaveDataEntry;
  441.  
  442.       GetDataEntry (ord(aShortInt2DE));
  443.       VarAddr     := @aShortInt2;
  444.       TypeOfData  := ShortInts;
  445.       Row         := 16;
  446.       Col         := 20;
  447.       Field       := 4;
  448.       CheckRangeProc := VerifyShortInt2;
  449.       HelpWndwNum := ord(NumericHW);
  450.       SaveDataEntry;
  451.  
  452.       GetDataEntry (ord(aInteger2DE));
  453.       VarAddr     := @aInteger2;
  454.       TypeOfData  := Integers;
  455.       Row         := 17;
  456.       Col         := 20;
  457.       Field       := 6;
  458.       CheckRangeProc := VerifyInteger2;
  459.       HelpWndwNum := ord(NumericHW);
  460.       SaveDataEntry;
  461.  
  462.       GetDataEntry (ord(aLongInt2DE));
  463.       VarAddr     := @aLongInt2;
  464.       TypeOfData  := LongInts;
  465.       Row         := 18;
  466.       Col         := 20;
  467.       Field       := 12;
  468.       CheckRangeProc := VerifyLongInt2;
  469.       HelpWndwNum := ord(NumericHW);
  470.       SaveDataEntry;
  471.  
  472.       GetDataEntry (ord(aReal2DE));
  473.       VarAddr     := @aReal2;
  474.       TypeOfData  := Reals;
  475.       Row         := 19;
  476.       Col         := 20;
  477.       Field       := 17;
  478.       CheckRangeProc := VerifyReal2;
  479.       HelpWndwNum := ord(NumericHW);
  480.       SaveDataEntry;
  481.  
  482.       GetDataEntry (ord(aHex2DE));
  483.       VarAddr     := @aHex2;
  484.       TypeOfData  := UserNums;
  485.       Row         := 14;
  486.       Col         := 50;
  487.       Field       := 4;
  488.       SetName     := HexSet;
  489.       TranslateProc := TranslateCase;
  490.       HelpWndwNum := ord(NumericHW);
  491.       SaveDataEntry;
  492.  
  493.       GetDataEntry (ord(aChar2DE));
  494.       VarAddr     := @aChar2;
  495.       TypeOfData  := Chars;
  496.       Row         := 15;
  497.       Col         := 50;
  498.       Field       := 1;
  499.       CheckRangeProc := VerifyChar2;
  500.       HelpWndwNum := ord(TextHW);
  501.       SaveDataEntry;
  502.  
  503.       GetDataEntry (ord(aString2DE));
  504.       VarAddr     := @aString2;
  505.       TypeOfData  := Strings;
  506.       Row         := 16;
  507.       Col         := 50;
  508.       Field       := 20;
  509.       MaxField    := pred(sizeof(aString2));
  510.       CheckRangeProc := VerifyString2;
  511.       HelpWndwNum := ord(TextHW);
  512.       SaveDataEntry;
  513.  
  514.       GetDataEntry (ord(FileNameDE));
  515.       VarAddr     := @FileName;
  516.       TypeOfData  := Strings;
  517.       Row         := 17;
  518.       Col         := 50;
  519.       Field       := 12;
  520.       MaxField    := pred(sizeof(FileName));
  521.       SetName     := FileNameSet;
  522.       HelpWndwNum := ord(TextHW);
  523.       SaveDataEntry;
  524.     end;
  525.  
  526. end;  { procedure GetDataEntryStats }
  527.  
  528. { =================== Data Entry Initialization Code ======================= }
  529. { The following code initializes all of the stats for the data entry windows }
  530. { and the work window data entry fields.  There is no need to edit this      }
  531. { Except for the default colors in SetDefaultColors.                         }
  532. { -------------------------------------------------------------------------- }
  533.  
  534. procedure AllocateHeap;
  535. begin
  536.   if HeapOK (sizeof(DataWndws)) then
  537.     GetMem (DataWndw,SizeOf(DataWndws));
  538.   fillchar (DataWndw^,SizeOf(DataWndws),0);
  539.   if HeapOK (sizeof(DataEntries)) then
  540.     GetMem (DataEntry,SizeOf(DataEntries));
  541.   fillchar (DataEntry^,SizeOf(DataEntries),0);
  542. end;
  543.  
  544. procedure SetDefaultColors;
  545. begin
  546.   { ------------------ Set up your colors and borders here: ---------------- }
  547.   if QvideoMode=Mono then
  548.     begin
  549.       DataEntryIattr := LightGray;         { Input  attribute }
  550.       DataEntryOattr := White;             { Output attribute }
  551.       DataWndwIattr  := White;             { Input  attribute }
  552.       DataWndwOattr  := LightGrayBG;       { Output attribute }
  553.     end
  554.   else
  555.     begin
  556.       DataEntryIattr := Yellow+MagentaBG;  { Input  attribute }
  557.       DataEntryOattr := Black+LightGrayBG; { Output attribute }
  558.       DataWndwIattr  := Black+BrownBG;     { Input  attribute }
  559.       DataWndwOattr  := Yellow+BlackBG;    { Output attribute }
  560.     end;
  561.   DataWndwBattr  := Black+BrownBG;     { Border attribute }
  562.   DataWndwBrdr   := HdoubleBrdr;
  563. end;
  564.  
  565. procedure InitDataColors;
  566. var  i: word;
  567. begin
  568.   for i:=1 to NumOfDataWndws do
  569.     with TopDataWndw,TopDataWndw.Entry do
  570.       begin
  571.         GetDataWndw (i);
  572.         Iattr := DataWndwIattr;   { Input  attribute }
  573.         Oattr := DataWndwOattr;   { Output attribute }
  574.         Battr := DataWndwBattr;   { Border attribute }
  575.         SaveDataWndw;
  576.       end;
  577.   for i:=1 to NumOfDataEntries do
  578.     with TopEntry do
  579.       begin
  580.         GetDataEntry (i);
  581.         Iattr := DataEntryIattr;  { Input  attribute }
  582.         Oattr := DataEntryOattr;  { Output attribute }
  583.         SaveDataEntry;
  584.       end;
  585. end;
  586.  
  587. function GetJustify (Justify: DirType; TOD: TypeOfDataType): DirType;
  588. begin
  589.   if Justify=NoDir then
  590.     begin
  591.       if TOD<=UserNums then
  592.            GetJustify := Right   { for nums }
  593.       else GetJustify := Left;   { for chars and strings }
  594.     end
  595.   else GetJustify:=Justify;
  596. end;
  597.  
  598. function GetSetName (SN: SetNames; TOD: TypeOfDataType): SetNames;
  599. begin
  600.   if SN=NoSet then
  601.     case TOD of
  602.       Bytes,Words:         GetSetName := UnsignedSet;
  603.       ShortInts..LongInts: GetSetName := SignedSet;
  604.       Reals:               GetSetName := RealSet;
  605.     else
  606.       GetSetName := CharSet;
  607.     end
  608.   else GetSetName:=SN;
  609. end;
  610.  
  611. procedure InitDataDefaults;
  612. var i: word;
  613. begin
  614.   for i:=1 to NumOfDataWndws do
  615.     with TopDataWndw,TopDataWndw.Entry do
  616.       begin
  617.         GetDataWndw (i);
  618.         Border  := DataWndwBrdr;
  619.         SetName := GetSetName (SetName,TypeOfData);
  620.         Row := 1;
  621.         Col := 2;
  622.         if MaxField=0 then
  623.           MaxField := Field;
  624.         JustifyOutput := GetJustify (JustifyOutput,TypeOfData);
  625.         if MsgLineNum=0 then
  626.           MsgLineNum := ord(DW_ML);
  627.         SaveDataWndw;
  628.       end;
  629.   for i:=1 to NumOfDataEntries do
  630.     with TopEntry do
  631.       begin
  632.         GetDataEntry (i);
  633.         SetName := GetSetName (SetName,TypeOfData);
  634.         if MaxField=0 then
  635.           MaxField := Field;
  636.         JustifyOutput := GetJustify (JustifyOutput,TypeOfData);
  637.         if MsgLineNum=0 then
  638.           MsgLineNum := ord(DE_ML);
  639.         SaveDataEntry;
  640.       end;
  641. end;
  642.  
  643. BEGIN
  644.   AllocateHeap;
  645.   SetDefaultColors;
  646.   InitDataColors;
  647.   {$ifdef UseMsgLineCode }
  648.   GetErrMsgs;
  649.   {$endif }
  650.   GetDataEntryStats;
  651.   InitDataDefaults;
  652. END.
  653.